#ifndef SELECTION_H
#define SELECTION_H

#include <QObject>
#include <cell.h>

class Selection : public QObject
{
    Q_OBJECT
public:
    explicit Selection(QObject *parent = nullptr);
    void select(Cell *cell);
    Cell* getCell();
    bool isSelected();
    void unselect();
private:
    Cell *cell = nullptr;
    Cell *prevCell = nullptr;
    bool selected=false, prevSelected=false;
    void setSelected(bool selected);
signals:
    void move(Cell* start, Cell* end);
};

#endif // SELECTION_H
